// 云对象教程: https://uniapp.dcloud.net.cn/uniCloud/cloud-obj
// jsdoc语法提示教程：https://ask.dcloud.net.cn/docs/#//ask.dcloud.net.cn/article/129
module.exports = {
	 _before() { // _before是云对象中每个方法运行前都会执行的方法
	    this.frvManager = uniCloud.getFacialRecognitionVerifyManager({
	      requestId: this.getUniCloudRequestId()
	    })
	  },
	/**
	 * 获取CertifyId
	 * @param {object} user 身份证用户信息
	 * @returns {object} metaInfo
	 */
	
	async getCertifyId(user,metaInfo) {
		  const result = await this.frvManager.getCertifyId({
		    realName: user.name,
		    idCard: user.idCard,
		    metaInfo: metaInfo
		  })
		  return result
	}
	
}
